001    /**
002     * HangmanUI is a Java Interface that describes the behavior of a 
003     * user interface for the solitaire Hangman game.
004     * The user interface allows the player to guess letters and displays the 
005     * correctly guessed letters.  
006     * @version 1.0
007     * @author J. Dalbey
008     */
009    public interface HangmanUI
010    {
011        /**
012         *  Start the display. For event-driven interfaces this method 
013         *  simply makes the interface visible.  For sequential (e.g. console-based) 
014         *  interfaces, this method must implement its own event loop.
015         */
016        public void display();
017    
018        /**
019         *   Display the current state of the board.
020         *   Specifically, display the turn counter and
021         *   display the board in some formatted manner.
022         */
023        public void showBoard();
024    
025        /**
026         *   Display that the player won the game.
027         */
028        public void showWin();
029    
030        /**
031         *   Display that the player lost the game.
032         *   Reveal the solution.
033         */
034        public void showLose();
035    
036        /** 
037         *  Handle end of game, asking if the player wants another game
038         *  If yes, start a new game, otherwise exit.
039         */
040        public void playAgain();
041    
042        /**
043         *  Save a reference to the instance of the Board.
044         *  @param Board the instance of board that we should use.
045         */
046        public void setBoard(Board theBoard);
047    
048        /**
049         *  Save a reference to the parent 
050         *  @param HangmanLogic the instance of HangmanLogic that owns us.
051         */
052        public void setParent(HangmanLogic parent);
053    }